a = int(input())
n = int(input())
s = 0
x = 0
for i in range(n):
    x = x*10 + a
    s += x
print(s)
